Algorithms for the Hybrid Constrained Longest Common Subsequence Problem
نویسنده
چکیده
We investigate a variant of the longest common subsequence problem. Given two sequences X, Y and two constrained patterns P , Q of lengths m, n, p, and q, respectively, the hybrid constrained longest common subsequence problem is to find a longest common subsequence of X and Y such that the resulting LCS is both a supersequence of P and a nonsupersequence of Q. Without loss of generality, assume that m ≤ n. We present a new dynamic programming algorithm for solving this problem in O(mnpq) time and space. We also propose another algorithm by restricting the computation on the positions of matches between X and Y . The latter algorithm requires O(pqr log log n + n log n) time over an infinite alphabet and O((pqr+n) log log n)) time over a finite alphabet, and O(pq(r + n)) space for both cases, where r denotes the total number of matches between X and Y .
منابع مشابه
A simple algorithm for the constrained sequence problems
In this paper we address the constrained longest common subsequence problem. Given two sequences X , Y and a constrained sequence P , a sequence Z is a constrained longest common subsequence for X and Y with respect to P if Z is the longest subsequence of X and Y such that P is a subsequence of Z. Recently, Tsai [7] proposed an O(n ·m · r) time algorithm to solve this problem using dynamic prog...
متن کاملOn the Constrained Longest Common Subsequence Problem
The problem of the longest common subsequence is a classical distance measure for strings. There have been several attempts to accommodate longest common subsequences along with some other distance measures. There are a large number of different variants of the problem. In this paper, we consider the constrained longest common subsequence problem for two strings and arbitrary number of constrai...
متن کاملConstrained Longest Common Subsequence Computing Algorithms in Practice
The problem of finding a constrained longest common subsequence (CLCS) for the sequences A and B with respect to the sequence P was introduced recently. Its goal is to find a longest subsequence C of A and B such that P is a subsequence of C. There are several algorithms solving the CLCS problem, but there is no real experimental comparison of them. The paper has two aims. Firstly, we propose a...
متن کاملAlgorithms for the Constrained Longest Common Subsequence Problems
Given strings S1, S2, and P , the constrained longest common subsequence problem for S1 and S2 with respect to P is to find a longest common subsequence lcs of S1 and S2 such that P is a subsequence of this lcs. We present an algorithm which improves the time complexity of the problem from the previously known O(rnm) to O(rnm) where r, n, and m are the lengths of P, S1, and S2, respectively. As...
متن کاملQuadratic-time Algorithm for the String Constrained LCS Problem
The problem of finding a longest common subsequence of two main sequences with some constraint that must be a substring of the result (STR-IC-LCS) was formulated recently. It is a variant of the constrained longest common subsequence problem. As the known algorithms for the STR-IC-LCS problem are cubic-time, the presented quadratic-time algorithm is significantly faster.
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2010